package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author kukaha
 * @version 1.0.0
 * @ClassName TestController.java
 * @Description TODO
 * @createTime 2021年03月02日 08:50:00
 */
@RestController
@RequestMapping("home")
public class TestController {


    @RequestMapping("swiperData")
    public Map<String, Object> swiperData(){
        Map<String, Object> map = new HashMap<>(10);
        Map<String, Object> map1 = new HashMap<>(10);
        Map<String, Object> map3 = new HashMap<>(10);
        Map<String, Object> map4 = new HashMap<>(10);
        Map<String, Object> map2 = new HashMap<>(10);

        List<Object> lists = new ArrayList<>();

        map1.put("image_src","//img11.360buyimg.com/pop/s590x470_jfs/t1/156624/9/10932/74300/6034a010Ecfe5c4d5/e167f0034f218205.jpg.webp");
        map1.put("open_type","navigate");
        map1.put("goods_id",129);
        map1.put("navigator_url","//img12.360buyimg.com/pop/s590x470_jfs/t1/164288/15/7807/100234/60378290E7c0a2352/1967d27f1e80b124.jpg.webp");
        lists.add(map1);
        map3.put("image_src","//imgcps.jd.com/ling4/100012043978/5paw5bm05aW96LSn5LiT5Zy6/54iG5qy-5aW96LSn5L2O5Lu356eS5p2A/p-5bd8253082acdd181d02fa47/57193407/cr/s/q.jpg");
        map3.put("open_type","navigate");
        map3.put("goods_id",130);
        map3.put("navigator_url","//img12.360buyimg.com/pop/s590x470_jfs/t1/164288/15/7807/100234/60378290E7c0a2352/1967d27f1e80b124.jpg.webp");
        lists.add(map3);
        map4.put("image_src","//imgcps.jd.com/ling4/2922989/5oqi5aSn6aKd5Yi4/5ruhNTHlh481MA/p-5bd8253082acdd181d02fa0f/60aadbe1/cr/s/q.jpg");
        map4.put("open_type","navigate");
        map4.put("goods_id",131);
        map4.put("navigator_url","//img12.360buyimg.com/pop/s590x470_jfs/t1/164288/15/7807/100234/60378290E7c0a2352/1967d27f1e80b124.jpg.webp");
        lists.add(map4);

        map2.put("msg","获取成功");
        map2.put("status",200);

        map.put("message",lists);
        map.put("meta",map2);
        return map;
    }


    @RequestMapping("swiperData1")
    public Map<String, Object> swiperData1(){
        Map<String, Object> map = new HashMap<>(10);
        Map<String, Object> map1 = new HashMap<>(10);
        Map<String, Object> map3 = new HashMap<>(10);
        Map<String, Object> map4 = new HashMap<>(10);
        Map<String, Object> map5 = new HashMap<>(10);
        Map<String, Object> map2 = new HashMap<>(10);

        List<Object> lists = new ArrayList<>();

        map1.put("image_src","http://m.360buyimg.com/babel/jfs/t1/30057/19/14881/720/5cbf064aE187b8361/eed6f6cbf1de3aaa.png");
        map1.put("open_type","switchTab");
        map1.put("name","分类");
        map1.put("navigator_url","//m.360buyimg.com/babel/jfs/t1/36478/38/5384/2901/5cbf065aEb0c60a12/afb4399323fe3b76.png");
        lists.add(map1);
        map3.put("image_src","//imgcps.jd.com/ling4/100012043978/5paw5bm05aW96LSn5LiT5Zy6/54iG5qy-5aW96LSn5L2O5Lu356eS5p2A/p-5bd8253082acdd181d02fa47/57193407/cr/s/q.jpg");
        map3.put("name","超市购");
        lists.add(map3);
        map4.put("image_src","https://m.360buyimg.com/babel/jfs/t1/52683/35/10394/3447/5d7739edE270aa7b3/d4d1151b09b5553b.png");
        map4.put("name","秒杀拍");
        lists.add(map4);
        map5.put("image_src","https://m.360buyimg.com/babel/jfs/t1/60778/37/9838/3066/5d7739faEd3b7dbb9/dd4d9ef7ce8fc169.png");
        map5.put("name","母婴品");
        lists.add(map5);
        map2.put("msg","获取成功");
        map2.put("status",200);

        map.put("message",lists);
        map.put("meta",map2);
        return map;
    }
}
